<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			//functionReturn();
				testForArray();
			function testForArray() {
				var a = [{
						"name": "1",
						"sex": "1"
					},
					{
						"name": "2",
						"sex": "2"
					},
					{
						"name": "3",
						"sex": "3"
					}
				];

				for(var key in a) {
					console.log(key)
					console.log(a[key]);
				}
			}

			function functionReturn() {
				for(var i = 0; i < 10; i++) {
					fReturn(i);
				}
			}

			function fReturn(i) {
				if(i == 5) {
					return;
				}
				console.log(i)
			}

			function testForBreak() {
				var arr = [1, 2, 3, 5];

				for(var i = 0; i < arr.length; i++) {
					if(arr[i] == 1) {
						break
					}
					console.log(arr[i])
				}
			}
		</script>
	</body>

</html>